import yagmail,logging
def log_set():
    logging.basicConfig('baogao.txt',level=logging.DEBUG,filemode='w+',format='%(message)s -> %(levelname)s -> %(asctime)s ')

def send_mail(filep):
    main = yagmail.SMTP(user='3034738910@qq.com',password='dtvwxyjchccbdcgf',host='smtp.qq.com')
    main.send(to='3484055372@qq.com',subject='测试报告',contents='请查阅',attachments=filep)
